//
//  BleConnectedCell.m
//  StormWatch
//
//  Created by 王岩 on 2024/9/11.
//

#import "BleConnectedCell.h"

@implementation BleConnectedCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.layer.cornerRadius = 10;
    self.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.layer.borderWidth = 1;
    self.stateView.layer.cornerRadius = 9;
    
    UILongPressGestureRecognizer * longges = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(clickLong:)];
    longges.minimumPressDuration = 1.0;
    [self addGestureRecognizer:longges];
    
    // Initialization code
}

- (void)clickLong:(UILongPressGestureRecognizer *)longPress {
    if (longPress.state == UIGestureRecognizerStateBegan) {
        
        LEEAlert.alert.config
            .LeeTitle(SWString(@"Delete the historical device"))
            .LeeContent([NSString stringWithFormat:@"%@ %@",SWString(@"Confirm the deletion of"),@"ONOX-S"])
            .LeeAction(SWString(@"Confirm"), ^{
                self.deleteBlock();
            })
            .LeeCancelAction(SWString(@"Cancel"), ^{
                
            })
            .LeeShow();
    }
    
    
}

@end
